1. Field of the Invention
The present invention relates generally to an improved data processing system. More specifically, the present invention is directed to a computer implemented method, system, and computer usable program code to dynamically distribute unused processor cycles within a dispatch window.
2. Description of the Related Art
A modern computer system typically comprises a central processing unit (CPU) and supporting hardware necessary to store, retrieve, and transfer information, such as communications busses and memory. It also includes, for example, hardware necessary to communicate with the outside world, such as input/output controllers or storage controllers and devices attached thereto, such as keyboards, monitors, tape drives, disk drives, and communication lines coupled to a network. The CPU is the heart of the computer system. The CPU executes instructions, which comprise a computer program, and directs the operation of the other computer system components.
Fundamentally, most computer systems operate in the same manner in that the CPU is only capable of performing a limited set of very simple operations, such as arithmetic, logical comparisons, and movement of data from one location to another. Programs may direct a CPU to perform massive numbers of these simple operations, but each operation must be performed very quickly. Therefore, improvements to computer systems require that these systems be made ever faster.
The overall speed of a computer system, which is also called the throughput, may be measured as the number of operations performed per unit of time. Without changing the computer system's clock speed, it is possible to improve throughput by using multiple copies of certain computer components, and in particular, by using multiple processors. The modest cost of individual processors and other components packaged on integrated circuit chips has made this practical. As a result, many current large-scale computer system designs include multiple processors, caches, buses, I/O drivers, storage devices, and so forth.
One recent development in response to increased system complexity is logical partitioning of the various resources of a large computer system. A logical partition (LPAR) is a logical segmentation of the computer system's processor(s), memory, and other resources that allows the logical partition to run its own copy of an operating system and associated applications. Conceptually, logical partitioning means that multiple discrete partitions are established within the computer system and the computer system's resources are assigned to respective partitions. Each operation executes within a logical partition, which means that the operation may only use the resources assigned to that partition and not any resources assigned to other partitions. This creation of logical partitions within the computer system is known as a “virtual environment.”
Generally, logical partitions are created by a system administrator or user with similar authority. Creation of the partition is performed by issuing commands to appropriate management software resident on the computer system, rather than physical reconfiguration of hardware components. It is expected, and indeed one of the benefits of logical partitioning, that the system administrator may re-allocate system resources in response to changing needs or improved understanding of the computer system's performance.
Presently, partitions are either dedicated processor partitions or shared processor partitions. A system administrator using a dedicated processor partition scheme within the computer system assigns processors in increments of one full processor to a partition. A system administrator using a shared processor partition scheme assigns one increment, or a “slice,” of one full processor to a partition, which is known as micro-partitioning.
There are two types of micro-partitions, namely “capped” and “uncapped.” A capped partition is not allowed to exceed its time entitlement, whereas an uncapped partition is allowed to exceed its time entitlement. A time entitlement is a given number of processing units, or CPU cycles, assigned by the system administrator to a particular partition. A capped partition indicates that the partition will never exceed its assigned processing capacity. The system administrator may use a capped partition if the system administrator knows that an operation will never require more than a certain amount of processing capacity.
In a virtualized environment, a partition is guaranteed full use of the partition's time entitlement within a dispatch window, which may be, for example, 10 milliseconds (ms). A dispatch window defines a period during which operations are allowed to start. Any unused portion of the dispatch window is redistributed to the uncapped partitions within the computer system. The current redistribution method is somewhat random in that computer systems use a standard lottery scheduling policy. The problem with this standard lottery scheduling redistribution method is that it does not give preferential treatment to the busiest uncapped partitions.
A partition is only dispatched when the partition has work to do. Until the partition is dispatched, the partition is placed in a queue. The queue only contains ready-to-run partitions or partitions waiting on an interrupt.
The standard lottery scheduling redistribution method is based on a predefined, static weight associated with the uncapped partitions. The system administrator assigns a partition's weight at the time the partition is created. The partition's weight may be, for example, between 0 and 127. The higher the partition's weight, the more likely the partition is granted the unused CPU cycles. But, standard lottery scheduling based on partition weight does not take into account the possible cyclical load behavior in a partition or the partition's past usage history. One method to deal with this cyclical load behavior is to increase the weight associated with the partition when the load is high. However, the weight is static, set at partition creation time, and the only way to change the weight in some virtualized environments is to stop and restart the partition. Additionally, by increasing the partition's weight, the partition stands a higher chance of being dispatched even though the recent history of the partition may show that the partition is not very busy.
Another possible method for favoring the busiest uncapped partition is to use a load balancer. However, this load balancer method involves higher processor overhead and is CPU intensive. Also, using a load balancing application on top of firmware to prioritize partitions may involve duplication of work and resources.
Therefore, it would be beneficial to have a computer implemented method, system, and computer useable program code for dynamically distributing unused processor cycles within a dispatch window to the busiest uncapped partitions when partitions experience high loads at different times throughout the day, thereby avoiding the dispatch of less busy partitions.